<?
session_start();
include("classes/connect.php");
require_once('classes/class.jira.php');
include('config.php');
ini_set('display_errors', 'Off');

$selecteddata=$_POST['deletedata'];

$config->username= $username;
$config->password= $pass;
$config->port= "";
$config->host= $host;
$queryIssue = new Jira($config);

foreach($selecteddata as $value){

	$explode=explode(':',$value);
	$DBID=$explode[0];
	$jiraid=$explode[1];

	$sql="UPDATE trn_emaildetails SET
			deleted='1'
			WHERE id='".$DBID."'
		 ";
	mysql_query($sql);
	$query=$jiraid;
	$array=$queryIssue->deleteIssue($query);
}
?>
<meta http-equiv="refresh" content="0.1;url=home.php">